package com.pucong.gitee.database.backup.common.entity.websock;

import com.pucong.gitee.database.backup.common.entity.database.vo.ExeSqlResult;
import com.pucong.gitee.database.backup.common.entity.database.vo.RunSqlResultPage;
import com.pucong.gitee.database.backup.common.selfenum.DatabaseExeStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;


@Data
@ApiModel("数据库执行 websocket 返回数据")
public class DatabaseSqWebsocketVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiParam("执行状态")
    private Boolean execSuccess;

    @ApiModelProperty("执行类型")
    private DatabaseExeStatusEnum exeStatusEnum;

    @ApiParam("数据")
    private RunSqlResultPage exeSqlResultPage;

    @ApiParam("数据")
    private ExeSqlResult exeSqlResult;

    @ApiParam("错误信息")
    private String errorContent;

    @ApiParam("导出文件id")
    private String exportFileId;

    public Integer getExeStatusEnum() {
        return exeStatusEnum.getValue();
    }
}
